/*
 * BusinessController.java
 * business
 *
 * Created by ChenTao on 2017/1/18.
 *
 * Copyright (c) 2017年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.ui.widget.dialog;

import android.content.Context;
import android.content.DialogInterface;

class BusinessDialogController {

    private Context mContext;

    private DialogInterface.OnClickListener mPositiveListener;

    private DialogInterface.OnClickListener mNegativeListener;

    private DialogInterface.OnClickListener mSingleConfirmListener;

    private String mTitle;

    private String mMessage;

    private String mNegativeText;

    private String mPositiveText;

    private boolean mCancelable = true;

    private int mContentGravity;

    private boolean mIsSingleConfirmButton;

    BusinessDialogController(Context context) {
        this.mContext = context;
    }

    public Context getContext() {
        return mContext;
    }

    DialogInterface.OnClickListener getPositiveListener() {
        return mPositiveListener;
    }

    void setPositiveButtonListener(DialogInterface.OnClickListener confirmListener) {
        this.mPositiveListener = confirmListener;
    }

    DialogInterface.OnClickListener getNegativeListener() {
        return mNegativeListener;
    }

    void setNegativeButtonListener(DialogInterface.OnClickListener cancelListener) {
        this.mNegativeListener = cancelListener;
    }

    String getTitle() {
        return mTitle;
    }

    void setTitle(String title) {
        this.mTitle = title;
    }

    String getMessage() {
        return mMessage;
    }

    void setMessage(String message) {
        this.mMessage = message;
    }

    String getNegativeText() {
        return mNegativeText;
    }

    void setNegativeButtonText(String cancelText) {
        this.mNegativeText = cancelText;
    }

    String getPositiveText() {
        return mPositiveText;
    }

    void setPositiveButtonText(String confirmText) {
        this.mPositiveText = confirmText;
    }

    int getContentGravity() {
        return mContentGravity;
    }

    void setContentGravity(int contentGravity) {
        this.mContentGravity = contentGravity;
    }

    boolean isSingleConfirmButton() {
        return mIsSingleConfirmButton;
    }

    void setSingleConfirmButton(boolean singleConfirmButton) {
        mIsSingleConfirmButton = singleConfirmButton;
    }

    boolean isCancelable() {
        return mCancelable;
    }

    void setCancelable(boolean cancelable) {
        this.mCancelable = cancelable;
    }

    DialogInterface.OnClickListener getSingleConfirmListener() {
        return mSingleConfirmListener;
    }

    void setSingleConfirmListener(DialogInterface.OnClickListener singleConfirmListener) {
        this.mSingleConfirmListener = singleConfirmListener;
    }
}
